Propositional Reasoning about Safety and Termination of Heap-Manipulating Programs
نویسندگان
چکیده
This paper shows that it is possible to reason about the safety and termination of programs handling potentially cyclic, singlylinked lists using propositional reasoning even when the safety invariants and termination arguments depend on constraints over the lengths of lists. For this purpose, we propose the theory SLH of singly-linked lists with length, which is able to capture non-trivial interactions between shape and arithmetic. When using the theory of bit-vector arithmetic as a background, SLH is efficiently decidable via a reduction to SAT. We show the utility of SLH for software verification by using it to express safety invariants and termination arguments for programs manipulating potentially cyclic, singly-linked lists with unrestricted, unspecified sharing. We also provide an implementation of the decision procedure and use it to check safety and termination proofs for several heap-manipulating programs.
منابع مشابه
Instrumentation Analysis: An Automated Method for Producing Numeric Abstractions of Heap-Manipulating Programs
A number of questions regarding programs involving heap-based data structures can be phrased as questions about numeric properties of those structures. A data structure traversal might terminate if the length of some path is eventually zero or a function to remove n elements from a collection may only be safe if the collection has size at least n. In this thesis, we develop proof methods for re...
متن کاملLogics and analyses for concurrent heap-manipulating programs
Reasoning about concurrent programs is difficult because of the need to consider all possible interactions between concurrently executing threads. The problem is especially acute for programs that manipulate shared heap-allocated data structures, since heapmanipulation provides more ways for threads to interact. Modular reasoning techniques sidestep this difficulty by considering every thread i...
متن کاملCyclic Abduction of Inductively Defined Safety and Termination Preconditions
We describe a new method, called cyclic abduction, for automatically inferring safety and/or termination preconditions for heap-manipulating while programs, expressed as inductive definitions in separation logic. Cyclic abduction essentially works by searching for a cyclic proof of memory safety and/or termination, abducing definitional clauses of the precondition as necessary in order to advan...
متن کاملLocal Reasoning for Termination
In this paper, we bridge the gap between separation logic and transition invariants in order to obtain a uniform framework for proving total correctness of pointer programs. We introduce the concept of separated transition constraints to describe the local effect of pointer programs. Separated transition constraints provide a new view on locality by their non-tight interpretation. Furthermore, ...
متن کاملResource Reasoning and Labelled Separation Logic
This thesis develops resource reasoning with separation logic in the areas of modular program specification, program optimization, and concurrency verification for heap-manipulating programs. In the first part, we investigate the resources that are required for modular and complete program specifications. Since the safety footprints of a program (the resources required for safe execution) do no...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2015